/*
 * ExtensionMapLoader.java
 *
 * Created on 1. Februar 2007, 21:21
 *
 * Copyright (c) 2007 Daniel Gronau
 *
 * This file is part of KanjiTori.
 *
 * KanjiTori is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 3 of the License, or
 * (at your option) any later version.
 *
 * KanjiTori is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>
 *
 */

package kanjitori.map;

import kanjitori.abstraction.ExtensionLoader;

/**
 * ExtensionMapLoader invokes other MapLoaders based on the extension of the given
 * file name. 
 * The class implements the singleton pattern. Other Maploaders can be registered
 * with the register method. A Maploader can be registered multiple times with different
 * extensions. Please note that all extensions are converted and treated as lowercase.
 * Registering a MapLoader with an already registered extension will unregister the
 * former MapLoader attached to that extension.
 * @author Pirx
 */
public class ExtensionMapLoader extends ExtensionLoader<Map> {
    
    private static final ExtensionMapLoader INSTANCE = new ExtensionMapLoader();
    
    private ExtensionMapLoader() {
    }
    
    /**
     * Accessor to the singleton instance.
     * @return The singleton instance of ExtensionMapLoader
     */
    public static ExtensionMapLoader getInstance() {
        return INSTANCE;
    }
    
}
